#ifndef PORTTEST_H
#define PORTTEST_H

#include "porttestdll_global.h"
#include <QString>
#include "PortType.h"
#include "TestResult.h"
#include "EnumForPT.h"

class PORTTESTDLLSHARED_EXPORT PortTest{
public:
    PortTest(QByteArray &cArr);
    ~PortTest();
    QBool Run();
	const CTestResult &GetTestResult()const{
		return testResult;
	}

private:
    PortTest(){}//disable
    QBool ParseXmlConfig(QByteArray &xml, EPortType &pt, QDomElement &io, CPortType *&port);

private:
    QByteArray  xmlConfigInfor;
	QDomElement ioXmlElement;
    EPortType   portType;
	CPortType	*m_port;
    EResult     resultType;
	CTestResult testResult;
};

#endif // PORTTEST_H
